home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: 500 MB Amiga Software
/
500 MB Amiga Software - Euber 130 - Amiga Games Disc & Mag.iso
/
userbox
/
publicdomain
/
picticon
/
source
/
doloaddt.readme
< prev
next >
Wrap
Text File
|
1995-02-08
|
5KB
|
174 lines
doloaddt.m -- A datatype load, scale, remap and dither module.
COPYRIGHT ©1993,94 by:
US.Snail: Chad Randall
229 S.Washington St.
Manchester, Michigan, 48157-9680 USA
Internet: crandall@garnet.msen.com
Permission is granted for usage is the following contions are met:
1. Program displays "Datatype scaler written by Chad Randall" or equivelent,
but only if an "About" window is used.
2. Program documentation contains author and copyright information.
At minimum, a duplication of information located at beginning of this source.
3. If PD or Freeware, no fee is neccesary.
4. If Shareware, then a registered version of said program must be mailed to me.
5. Commercial usage must be authorized by me before distribution.
To use this module from your E program, you must have E 3.0, as I'm
not sure if it'll work on earlier versions. You can try if you want.
Just place the following line near the top of your main E source file:
MODULE '*doloaddt' -> If the module is in the same directory, or
MODULE 'tools/doloaddt' -> if it's located in EMODULES:tools
The format of the call is:
doloaddt(source,rastport,colormap,xtop,ytop,width,height,tags)
source: Either a pointer to a string or a clipboard unit number.
(If source <257 then it's treated as a unit number, strings
shouldn't reside below here, anyways!)
rastport: A pointer to a valid rastport. No checks are made.
colormap: A pointer to a valid colormap. No checks are made.
xtop: The leftmost/topmost point that can be affected.
ytop:
width: The size of the buffer you wish to fill.
height:
tags: A pointer to a list of tagitems;
name /type /default
DLDT_CENTER /boolean/FALSE
If =TRUE then the image is centered in the buffer.
DLDT_INTEGERSCALE /boolean/FALSE
If =TRUE then integerscaling will be performed. NOT TESTED (much)
DLDT_DITHER /boolean/TRUE
If =TRUE then then dithering is performed.
DLDT_REMAP /boolean/TRUE
If =TRUE then FindColor(colormap) is used to remap colors.
DLDT_ASPECTX /integer/1
DLDT_ASPECTY /integer/1
Defines the screen aspect of X:Y
DLDT_SCALE /boolean/TRUE
If =TRUE then image is scaled to fit buffer, else it's clipped
DLDT_USEASPECT /boolean/TRUE
If =TRUE then aspect information is used in scaling, otherwise
it's ignored.
DLDT_ENLARGE /boolean/FALSE
NOT IMPLEMENTED
DLDT_CLEAR /boolean/TRUE
IF =TRUE, then buffer is cleared
DLDT_GAUGE /PTR TO gauge/0
IF present, then a gauge struct is used to display progress.
"gauge" is defined below
DLDT_CLIGAUGE /string/0
If present, a string is filled with a number from 1-100 to
indicate the percentage done. String should contain a "%s"
symbol.
DLDT_HOOK /0/0
NOT IMPLEMENTED/DONT USE
DLDT_INFO /PTR TO imageinfo/0
If present, an imageinfo struct will be filled with picture/buffer
information. Defined below.
DLDT_BIDIRECTIONAL
NOT IMPLEMENTED
DLDT_DIARRAY
NOT IMPLEMENTED
DLDT_HIGHPEN /integer/-1
Highest pen to use for FindColor(). A -1 indicates all pens.
DLDT_FILLCMAP
PRIVATE
DLDT_GREYSCALE /boolean/FALSE
Creates a greyscale icon
DLDT_QUANTIZE /integer/256
Defines number of greyscales to use.
DLDT_CUSTOMFINDCOLOR
NOT IMPLEMENTED
DLDT_RENDERHAM /integer/0
Defines HAM rendering mode. Use 6 or 8.
DLDT_HAMTHRESHOLD /integer/64
Defines the fringing limit threshold.
DLDT_FULLHAMBASE /integer/3
Defines the number of ham-base colors.
DLDT_DISCARDERROR /boolean/FALSE
Helps HAM fringing a little if =TRUE. Experimental.
OBJECT gauge
rast:PTR TO rastport -> rastport to draw progress bar in
scr:PTR TO screen -> needed for drawinfo
x:INT -> dimensions of bar box. NO "bevel" box is drawn.
y:INT -> that's up to YOU.
w:INT
h:INT
ENDOBJECT
OBJECT imageinfo
source_w:LONG -> source picture dimensions
source_h:LONG
destination_x:LONG -> what was affected inside the rastport
destination_y:LONG
destination_w:LONG
destination_h:LONG
depth:LONG -> the depth of the source picture
highest_pen:LONG ->
reserved1:LONG
reserved2:LONG
reserved3:LONG
reserved4:LONG
reserved5:LONG
reserved6:LONG
reserved7:LONG
reserved8:LONG
blackpen:LONG -> A pen closest to black
whitepen:LONG -> A pen closest to white
greypen:LONG -> A pen closest to grey
ENDOBJECT